Dnsmasq DHCPv6 use colons in the generated duid present in the lease file. Strip the colon as this is not supported by the OpenWrt config and follow the same way odhcpd use to display duid.
Fixes: #4543
Signed-off-by: Ansuel Smith <[email protected]>
(cherry picked from commit
f71e9cbd42db24c7743589804dacfdf5513ca883)
return &ea;
}
+static void strip_colon_duid(char *str) {
+ char *pr = str, *pw = str;
+
+ while (*pr) {
+ *pw = *pr++;
+ pw += (*pw != ':');
+ }
+ *pw = '\0';
+}
static struct {
time_t now;
if (!e.hostname || !e.duid)
continue;
+ strip_colon_duid(e.duid);
+
if (!strcmp(e.hostname, "*"))
e.hostname = NULL;